#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<algorithm>
#include<unordered_map>
using namespace std;
const int N = 1e6 + 10;
unordered_map<int, int> mp;
int dit[N];
int n;
int a[N];
int main()
{
	cin >> n;
	int pos = 0;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		dit[++pos]=a[i];
	}
	sort(dit+1,dit+1+pos);
	int cnt = 0;
	for (int i = 1; i <= pos; i++)
	{
		int x = dit[i];
		if (mp.count(x))
		{
			continue;
		}
		cnt++;
		mp[dit[i]]=cnt;
	}
	for (int i = 1; i <= n; i++)
	{
		cout << a[i] << ":" << mp[a[i]] << endl;
	}
	return 0;
}